package com.itjob.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.itjob.entity.User;
import com.itjob.service.UserService;

@Controller
public class UserController {

	@Autowired
	private UserService userService;
	
	@RequestMapping("selectUser")
	public String getUser(Model model) {
		
		User user = userService.getUser();
		
		model.addAttribute("user",user);
		return "User";
	}
}
